'use strict';

const Service = require('egg').Service;

class NmslService extends Service {
  async getNmsl (res) {
    let sendMsg = this.ctx.service.sendMsg;
    let data = await this.ctx.curl('https://nmsl.shadiao.app/api.php?level=min&lang=zh_cn');
    // console.log(data.data.toString());
    data = data.data.toString()
    sendMsg.sendToGroup({
      id: res.group_id,
      msg: data
    });
  }
}

module.exports = NmslService;
